<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
      th:fragment="header">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!--CSRF-->
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css">
    <!-- Latest compiled and minified CSS -->
    <link href="https://cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.min.css" rel="stylesheet">
    <!--toastr消息提示-->
    <link href="https://cdn.bootcss.com/toastr.js/2.1.4/toastr.min.css" rel="stylesheet">
    <!--图标库-->
    <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <!--上传文件-->
    <link href="https://cdn.bootcss.com/bootstrap-fileinput/4.4.7/css/fileinput.min.css" rel="stylesheet">
    <!--date-->
    <link href="https://cdn.bootcss.com/bootstrap-datepicker/1.7.1/css/bootstrap-datepicker.min.css" rel="stylesheet">


</head>
<body>
<header sec:authorize="isAuthenticated()"  class="navbar navbar-expand-md navbar-dark  bg-dark sticky-top">
        <div class="container">
            <a class="navbar-brand" href="/" th:href="@{/}">实验室管理系统</a>
            <div>
                <ul class="navbar-nav mr-auto"></ul>
                <div class="form-inline float-right">
                    <div class="dropdown">
                        <a class="btn dropdown-toggle" href="..."  data-toggle="dropdown"><span sec:authentication="principal.teacherName"></span></a>
                        <div class="dropdown-menu" >
                            <a class=" dropdown-item">个人主页</a>
                            <a class="dropdown-item">个人设置</a>
                        </div>
                    </div>
                    <form  action="/logout" th:action="@{/logout}" method="post">
                        <input class="btn btn-outline-success  " type="submit" value="退出">
                    </form>
                </div>
            </div>
        </div>
</header>
</body>
</html>